<extend name="Public/base"/>
<block name="style">
    <style>
        .btn-jujue{background: #FF1717;}
        .btn-jujue:hover{background-color: #8d8d8d;}
    </style>
</block>
<block name="body">
    <div class="main-title">
        <h2></h2>
    </div>
    <form action="" method="post" class="form-horizontal">
        <input type="hidden" name="id" id="id" value="{$data['driver_id']}">
        <div style="overflow: hidden;width: 100%;" class="form-item">
            <div style="float: left;width: 50%;">
                <div style="width: 100px;height: 40px;background: #ccc;border-radius: 5px;line-height: 40px;text-align: center;font-size: 18px;margin-bottom: 15px;">个人信息</div>
                <ul >
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            注册手机号：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['driver_phone']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            所属车队：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['fleet_name']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            姓名：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['driver_name']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            身份证号：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['driver_identity']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            紧急联络人：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['driver_linkman']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            紧急联络人号码：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['driver_linkman_phone']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            常跑路线：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['route_line']}</div>
                    </li>
                </ul>
            </div>
            <div style="float: left;width: 50%;">
                <div style="width: 100px;height: 40px;background: #ccc;border-radius: 5px;line-height: 40px;text-align: center;font-size: 18px;margin-bottom: 15px;">车辆信息</div>
                <ul >
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            车牌号：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['car_no']}</div>
                    </li>
                    <!--                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                                            <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                                                行驶证号：
                                            </div>
                                            <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['fleet_name']}</div>
                                        </li>-->
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            车型桥数：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['car_bridge']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            是否有白卡：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;"><eq name="data['is_white_card']" value="1">有<else/>无</eq></div>
                    </li>
                </ul>
            </div>
        </div>
        <div style="overflow: hidden;width: 100%;" class="form-item">
            <div style="float: left;width: 50%;">
                <div style="width: 100px;height: 40px;background: #ccc;border-radius: 5px;line-height: 40px;text-align: center;font-size: 18px;margin-bottom: 15px;">照片信息</div>
                <ul >
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            身份证正面照：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;"><img width="300px" height="200px" src="__ROOT__{$data['identity_front']}"></div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            行驶证照：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;"><img width="300px" height="200px" src="__ROOT__{$data['driving_card']}"></div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            白卡照：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;"><img width="300px" height="200px" src="__ROOT__{$data['white_card']}"></div>
                    </li>
                </ul>
            </div>
            <div style="float: left;width: 50%;">
                <div style="width: 100px;height: 40px;line-height: 40px;text-align: center;font-size: 18px;margin-bottom: 15px;"></div>

                <ul >
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            身份证反面照：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;"><img width="300px" height="200px" src="__ROOT__{$data['identity_back']}"></div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="width: 30%;text-align: right;float: left;font-weight: bold;font-size: 16px;">
                            驾驶证照：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;"><img width="300px" height="200px" src="__ROOT__{$data['driver_card']}"></div>
                    </li>
                </ul>
            </div>

        </div>

        <eq name="data['status']" value="1">

        <div class="form-item">
            <label class="item-label">司机评分</label>
            <div class="controls">
                <input type="text" class="text input-2x" name="eval_num" value="{$data['eval_num']}">
            </div>
        </div>
        </eq>

        <div class="form-item">
            <eq name="data['status']" value="1">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <else/>
            <a class="btn submit-btn tongyi" href="javascript:;" data-id="{$data['driver_id']}" >通过</a>
            <a class="btn btn-return btn-jujue jujue" href="javascript:;" data-id="{$data['driver_id']}">拒绝</a>
            </eq>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
    <div class="show-box-back"  style="display: none;">
    </div>
    <!-- 审核通过框 -->
    <div class="show-box" id="js-tongguo" style="display: none;">
        <input type="hidden" name="driver_id" id="js-tongguo-id">
        <div class="show-box-msg" >
            提示
        </div>
        <div class="show-box-msg-content">
            确认通过该用户吗
        </div>
        <div class="show-box-bottom">
            <button class="js-show-btn-cancel btn btn-return " >返 回</button>
            <button class="js-show-btn-ok btn submit-btn" id="submit-tongguo" >确 定</button>

        </div>
    </div>

    <!-- 审核拒绝框 -->
    <div class="show-box" id="js-jujue" style="display: none;">
        <input type="hidden" name="driver_id" id="js-jujue-id">
        <div class="show-box-msg" >
            提示
        </div>
        <div class="show-box-msg-title">
            拒绝原因:
        </div>
        <div class="show-box-msg-area">
            <textarea class="show-box-msg-area" name="refund_desc" id="refund_desc" rows="3" cols="35"></textarea>
        </div>
        <div class="show-box-bottom">
            <button class="js-show-btn-cancel btn btn-return" >返 回</button>
            <button class="btn submit-btn" id="submit-jujue" >确 定</button>

        </div>
    </div>
</block>

<block name="script">
    <script>
        //搜索功能
        $(".tongyi").click(function () {
            var id = $(this).attr("data-id");
            $('#js-tongguo').show();
            $('.show-box-back').show();
            $('#js-tongguo-id').val(id);
        });
        //搜索功能
        $(".jujue").click(function () {
            var id = $(this).attr("data-id");
            $('#js-jujue').show();
            $('.show-box-back').show();
            $('#js-jujue-id').val(id);
        });

        $("#submit-tongguo").click(function () {

            var id = $("#js-tongguo-id").val();
            $.post("{:U('editstatus')}", {id: id, status: 1}, function (res) {
                if (res.status) {
                    updateAlert('审核成功', 'alert-success');
                    setTimeout(function () {
                        location.href = res.url;
                    }, 1500);
                }
            });
        });
        $("#submit-jujue").click(function () {
            var id = $("#js-jujue-id").val();
            var refund_desc = $("#refund_desc").val();
            $.post("{:U('editstatus')}", {id: id, status: 2, refund_desc: refund_desc}, function (res) {
                if (res.status) {
                    updateAlert('操作成功', 'alert-success');
                    setTimeout(function () {
                        location.href = res.url;
                    }, 1500);
                }
            });

        });
    </script>
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Driver / index')}');
    </script>
</block>
